<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>PCSYS</title>
</head>
<body>
<%@page import="com.walsai.pcsys.core.model.User" %>
<% 
if(session.getAttribute("userInfo") == null){  
    response.sendRedirect("../login.html");
}  
%>
Welcome, <c:out value="${userInfo.firstName}" /> <c:out value="${userInfo.lastName}" /> <c:out value="${userInfo.middleName}" />
<br /><br />
<a href="welcome.html">Index</a><br />
<c:if test="${userInfo.role == 0}">
<a href="profile.html">View and Modify My Profile</a><br />
<a href="contest.html">View All Contests</a><br />
<a href="problems.html">View All Problems</a><br />
<a href="users.html">View All Users</a><br />
<a href="adminSubmitProblem.html">Submit Problem with Solution</a><br />
<a href="problemselect.html">Generate Contest</a><br />
</c:if>

<c:if test="${userInfo.role == 1}">
<a href="profile.html">View and Modify My Profile</a><br />
<a href="problems.html">View All Problems</a><br />
<a href="contest.html">View All Exams</a><br />
<a href="resultados.html">View Resolved Problems and Solutions</a><br />
<a href="viewcontest.html">View Participated Contests</a><br />
</c:if>

<a href="logout.html">Logout</a>

<br />
<br />

